package com.lgrglw.search.action;

import com.lgrglw.search.dao.TestSearchDao;
import com.lgrglw.search.mapping.Demoentity;

public class DemoAction {

	private TestSearchDao testSearchDao;

	public TestSearchDao getTestSearchDao() {
		return testSearchDao;
	}

	public void setTestSearchDao(TestSearchDao testSearchDao) {
		this.testSearchDao = testSearchDao;
	}
	
	public String build(){
		Demoentity entity=new Demoentity();
		entity.setId("a1");
		entity.setName("18岁的雨季");
		entity.setPath("100");
		entity.setMenuTitle("中国工商银行祝您办理业务顺利");
		testSearchDao.saveOrUpdate(entity);
		Demoentity entity1=new Demoentity();
		entity1.setId("a2");
		entity1.setName("喜欢这个下雨季节");
		entity1.setPath("200");
		entity1.setMenuTitle("中国建设银行祝您消费愉快，祝您节日快乐！");
		testSearchDao.saveOrUpdate(entity1);
		Demoentity entity2=new Demoentity();
		entity2.setId("a3");
		entity2.setName("你知道我在等你吗");
		entity2.setPath("300");
		entity2.setMenuTitle("中国建设银行祝您消费愉快，祝您节日快乐！");
		testSearchDao.saveOrUpdate(entity2);
		return null;
	}
	
	public String  search(){
		try{
			testSearchDao.search();
		}catch(Exception e){
			e.printStackTrace();
		}
		
		return null;
	}
	
}
